﻿using System.Xml.Serialization;

namespace WJ.Infrastructure.WeChat.Model.Pay
{
    /// <summary>
    /// 创建订单返回参数
    /// </summary>
    [XmlRoot("xml",Namespace = "")]
    public class CreateOrderResponse
    {
        /// <summary>
        /// 返回状态码 SUCCESS/FAIL 此字段是通信标识，非交易标识，交易是否成功需要查看result_code来判断
        /// </summary>
        public string return_code { get; set; }
        
        /// <summary>
        /// 返回信息 如非空，为错误原因签名失败参数格式校验错误
        /// </summary>
        public string return_msg { get; set; }
        
        //以下字段在return_code为SUCCESS的时候有返回
        
        /// <summary>
        /// 小程序ID
        /// </summary>
        public string appid { get; set; }
        
        /// <summary>
        /// 商户号
        /// </summary>
        public string mch_id { get; set; }
        
        /// <summary>
        /// 随机字符串
        /// </summary>
        public string nonce_str { get; set; }
        
        /// <summary>
        /// 签名
        /// </summary>
        public string sign { get; set; }
        
        /// <summary>
        /// 业务结果
        /// </summary>
        public string result_code { get; set; }
        
        /// <summary>
        /// 错误代码
        /// </summary>
        public string err_code { get; set; }
        
        /// <summary>
        /// 错误代码描述
        /// </summary>
        public string 	err_code_des { get; set; }
        
        //以下字段在return_code 和result_code都为SUCCESS的时候有返回
        
        /// <summary>
        /// 交易类型
        /// </summary>
        public string trade_type { get; set; }
        
        /// <summary>
        /// 预支付交易会话标识
        /// </summary>
        public string prepay_id { get; set; }

        /// <summary>
        /// 支付跳转链接
        /// </summary>
        public string mweb_url { get; set; }
    }
}